package com.jboost.modules.app.service.strategry.dp.dto;

public enum FollowUpType {
    QUICK_RECORD(101, "快速记录"),
    EMAIL_COMMENT(102, "关联邮件备注"),
    PHONE(103, "电话"),
    MEETING(104, "会面"),
    SOCIAL_PLATFORM(105, "社交平台"),
    HEADQUARTERS_VISIT(106, "总部拜访"),
    OFFICE_VISIT(107, "办事处拜访"),
    HEADQUARTERS_VISITED(108, "来访总部"),
    OFFICE_VISITED(109, "来访办事处"),
    EMAIL(110, "邮件"),
    CUSTOMER_VISIT(111, "客户拜访"),
    SCHEDULE_FOLLOW_UP(112, "日程跟进");

    private final Integer code;
    private final String description;

    FollowUpType(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static String fromCode(Integer code) {
        for (FollowUpType type : FollowUpType.values()) {
            if (type.code.equals(code)) {
                return type.getDescription();
            }
        }
        return code.toString();
    }

    @Override
    public String toString() {
        return code + ": " + description;
    }
}